import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { ResourceService } from './resource.service';


@Controller('resource')
export class ResourceController {
  constructor(private readonly resourceService: ResourceService) {}

    // 创建部署资源
    @Post('/createFromYaml/:agentId')
    createDeployment(@Body() body: any) {
        return this.resourceService.createDeployment(body);
    }


    // 更新工作负载
    @Post('/updateFromYaml/:agentId')
    updateWorkload(@Body() body: any) {
        return this.resourceService.updateFromYaml(body);
    }

 
}
